home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 13 - 1997 (partial) / 13.02 Feb 97 / Challenge, Router Rules / ProvidedCode.h < prev    next >
Encoding:
Text File  |  1997-01-03  |  487 b   |  27 lines  |  [TEXT/R*ch]

  1. // ---------------------------------------------------------
  2. // Code copied from problem statement
  3. // ---------------------------------------------------------
  4.  
  5. enum {     kDeny = 0, 
  6.                 kAllow = 1 
  7. };
  8.  
  9. #ifdef __cplusplus
  10. extern "C" {
  11.  
  12. #endif
  13. typedef struct Rule {
  14.     long    mask;
  15.     long    value;
  16.     long    allow;
  17. } Rule;
  18.  
  19. long RouterRules( long    allowedValues[],
  20.                                     long    numAllowedValues,
  21.                                     long    numBits,
  22.                                     Rule    rulesArray[],
  23.                                     long    maxRules );
  24. #ifdef __cplusplus
  25. }
  26. #endif
  27.